﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ZonePermision.ascx.cs" Inherits="Framework.Module.CMS.Admin.Zones.ZonePermision" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:UpdatePanel ID="upanelUserPermision" runat="server" UpdateMode="Conditional" RenderMode="Inline">
    <triggers>
        <asp:AsyncPostBackTrigger ControlID="cmdUpdate" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="cmdCancel" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="dtgUsers" EventName="ItemCommand" />
    </triggers>
    <contenttemplate>
		<table cellspacing="1" cellpadding="0" width="100%" border="0" class="content">
			<tbody>
			    <tr>
			        <tr>
                        <td class="header1" colspan="2" align="left">
                            <asp:Label ID="lblCommandName" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
						<td colspan="2" class="header2" height="18">
							<asp:Label ID="lblUpdateStatus" runat="server" Font-Bold="True" ForeColor="Blue"></asp:Label></td>
					</tr>
			    </tr>
				<tr>
					<td valign="top" width="60%" class="postheader">
					    <asp:Repeater ID="dtgUsers" runat="server" OnItemCommand="dtgUsers_ItemCommand">
                        <HeaderTemplate>
                            <table class="content" cellspacing="1" cellpadding="0" width="100%">
                                <tr>
                                    <td class="header1" colspan="6">
                                        <img src="/Images/blank.gif" alt="" height="4" width="4" /></td>
                                </tr>
                                <tr>
                                    <td class="header2" style="height: 19px" align="left" width="30%">
                                        Name</td>
                                    <td class="header2" style="height: 19px" align="left" width="20%">
                                        Email</td>
                                    <td class="header2" align="left" style="height: 19px" width="40%">
                                        Group</td>
                                    <td class="header2" align="center" style="height: 19px" width="10%">
                                        Action</td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                                <tr>
                                    <td class="post" align="left">
                                        <asp:LinkButton ID="NameEdit" runat="server" CommandName="roles" CommandArgument='<%# Eval("UserID") %>'
                                            Text='<%# Eval("Username") %>' /></td>
                                    <td class="post" align="left">
                                        <%# Eval("Email")%>
                                    </td>
                                    <td class="post" align="left">
                                        <%# Eval("RoleDescription")%>
                                    </td>
                                    <td class="post" align="center">
                                        <asp:Button ID="btnZonePermision" runat="server" CommandArgument='<%# Eval("UserID") %>' CommandName="roles" CssClass="pbutton" Text="Phân quyền" Width="85px" />
                                    </td>
                                </tr>
                        </ItemTemplate>
                        <FooterTemplate>                               
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>						
					</td>					
					<td class="postheader" valign="top">
						<table cellspacing="1" cellpadding="0" width="100%" border="0" class="content">
							<tbody>	
							    <tr>
                                    <td class="header1" colspan="6">
                                        <img src="/Images/blank.gif" alt="" height="4" width="4" /></td>
                                </tr>		
							    <tr>
						            <td colspan="2" class="header2" height="18">
						                Tài khoản : &nbsp;<asp:Label ID="lblUsername" runat="server" ForeColor="Red" Font-Bold="True"></asp:Label><asp:TextBox ID="txtUserID" Width="39px" runat="server" Visible="False" Enabled="False"></asp:TextBox>
						            </td>
						        </tr>								
								<tr>
									<td class="postheader">
										<asp:RadioButtonList ID="rdoPermisions"  Width="100%" CssClass="Button" runat="server" RepeatDirection="Horizontal">
											<asp:ListItem Value="2">Quản l&#253;</asp:ListItem>
											<asp:ListItem Value="1">Xuất bản tin</asp:ListItem>
											<asp:ListItem Value="0">Bi&#234;n tập</asp:ListItem>
										</asp:RadioButtonList></td>
								</tr>															
								<tr>
									<td class="postheader">
										Cổng : &nbsp;<asp:DropDownList ID="dropPortal" runat="server" AutoPostBack="True" CssClass="dropDefault" DataTextField="Portal_Name" DataValueField="PortalID">
                                        </asp:DropDownList></td>
								</tr>								
								<tr>
									<td class="postheader">                                        
										Quyền chuyên mục</td>
								</tr>								
								<tr>
									<td class="postheader">
										<asp:ListBox ID="lstZones" Width="100%" runat="server" SelectionMode="Multiple" Rows="15">
										</asp:ListBox></td>
								</tr>								
								<tr>
									<td class="postfooter" colspan="2" valign="middle" align="center">
										<asp:Button ID="cmdUpdate" OnClick="cmdUpdate_Click" Width="88px" CssClass="pbutton"
											runat="server" Text="Cập nhật"></asp:Button>
										<asp:Button ID="cmdCancel" OnClick="cmdCancel_Click" Width="88px" CssClass="pbutton"
											runat="server" Text="Hủy"></asp:Button>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
			</tbody>
		</table>
</contenttemplate>
</asp:UpdatePanel>